package com.eposi.eposigameinterface.adapter;

import com.eposi.eposigameinterface.R;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class ChatBoxAdapter extends BaseAdapter{
	private Context context;
	LayoutInflater mInflater;
	public ChatBoxAdapter(Context context) {
		this.context = context;
		mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
	}
	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return 10;
	}

	@Override
	public Object getItem(int arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		ChatBoxHolder holder;
		if (convertView == null) {
			holder = new ChatBoxHolder();
			convertView = mInflater.inflate(R.layout.list_chat_box_item, null);
			holder.userName = (TextView) convertView.findViewById(R.id.list_chat_box_item_user_name);
			holder.userMessage = (TextView) convertView.findViewById(R.id.list_chat_box_item_user_message);
			convertView.setTag(holder);
		}else{
			holder = (ChatBoxHolder) convertView.getTag();
		}
		return convertView;
	}
	class ChatBoxHolder{
		TextView userName;
		TextView userMessage;
		
	}
}
